home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 822 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: newsserver.rrzn.uni-hannover.de!tubsibr!duening
  2. From: duening@ibr.cs.tu-bs.de (Lars Duening)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: PPC compilers
  5. Date: 11 Jan 1996 22:21:04 GMT
  6. Organization: TU Braunschweig, Informatik (Bueltenweg), Germany
  7. Distribution: world
  8. Message-ID: <4d42gg$i2p@ra.ibr.cs.tu-bs.de>
  9. References: <john.hendrikx.40ka@grafix.xs4all.nl> <MQAQx*XOe@yaps.rhein.de> <OWhVx*42f@yaps.rhein.de> <4cuhng$dmn@maureen.teleport.com> <jasonb.821247870@cs.uwa.edu.au> <4d359i$ii7$1@sydney.DIALix.oz.au>
  10. Reply-To: duening@ibr.cs.tu-bs.de (Lars Duening)
  11. NNTP-Posting-Host: kastor.ibr.cs.tu-bs.de
  12.  
  13. In article <4d359i$ii7$1@sydney.DIALix.oz.au> accolyte@sydney.DIALix.oz.au (Troy Till) writes:
  14. >Bear with me here, 'cause I don't know the second thing about C..
  15. >
  16. >can you do something to the equivalent of:
  17. >
  18. >  addx.l d0,d1
  19. >  move.w d1,d2
  20. >
  21. >Which is treating d1 as a long word, then a word. How would you implement 
  22. >this in C?
  23.  
  24. I'd try (int16)((int32)a+(int32)b) with int16 and int32 appropriately
  25. defined.
  26.  
  27. But the question is: why should I treat d1 as long in the addition,
  28. when just the lower word is used afterwards?
  29. -- 
  30. Lars Duening; duening@ibr.cs.tu-bs.de
  31.